package com.ww.springboot.boot.algorithm.leetcode1;

/**
 * 描述：
 *
 * @author 🧑 ‍wanwei
 * @since 2022-03-11 14:25
 */
public class PrintUtil {

    public static void print(int[][] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            String ss = "";
            for (int j = 0; j < matrix[i].length; j++) {
                ss += " " + matrix[i][j];
            }
            System.out.println(ss);
        }
        System.out.println("---------------------");
    }

    public static void print(int[] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            System.out.println(matrix[i] + ",");
        }
        System.out.println("---------------------");
    }

    public static <T> void print(T[] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            System.out.println(matrix[i] + ",");
        }
        System.out.println("---------------------");
    }

    public static void print(byte[] matrix) {
        for (int i = 0; i < matrix.length; i++) {
            System.out.println(matrix[i] + ",");
        }
        System.out.println("---------------------");
    }
}
